public class Test {
    public static void main(String[] args) {
        //模拟实现队列
        MyQueue myQueue=new MyQueue();
        myQueue.offer(1);
        myQueue.offer(2);
        myQueue.offer(3);
        myQueue.offer(4);
        System.out.println(myQueue.poll());//出队列元素为1
        System.out.println(myQueue.poll());//出队列元素为2
        System.out.println(myQueue.peek());//队头元素为3
    }
}
